Allow Detection of WWW Autolinks#406
Conversation
robinst
left a comment
There was a problem hiding this comment.
Very nice, thanks for working on this!
I've left some comments in the PR for you to address, but overall great work.
|
|
||
| if (linkTypes.length == 0) { | ||
| throw new IllegalArgumentException("linkTypes must not be empty"); | ||
| } |
There was a problem hiding this comment.
No need to duplicate the checks above if we're delegating to linkTypes(Set<AutolinkType> linkTypes) anyway.
There was a problem hiding this comment.
Removed the second check. The first check was just to provide a more explicit error message than whatever is thrown by calling Set.of(null), but I can remove if we think that's unnecessary.
...k-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java
Outdated
Show resolved
Hide resolved
...k-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java
Outdated
Show resolved
Hide resolved
...k-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java
Outdated
Show resolved
Hide resolved
...k-ext-autolink/src/main/java/org/commonmark/ext/autolink/internal/AutolinkPostProcessor.java
Show resolved
Hide resolved
|
Thanks for the reviews! I think all comments should be addressed now. |
robinst
left a comment
There was a problem hiding this comment.
Looks good to me, thank you!
|
Were you working on anything else? Happy to do a release for this otherwise. |
Nothing else at the moment. Thanks for checking! |
|
Ok :). Released 0.27.0 with this: https://github.com/commonmark/commonmark-java/blob/commonmark-parent-0.27.0/CHANGELOG.md#0270---2025-10-12 |
Implements #298. Would be nice to have this additional functionality, so took a stab at a PR for this.
Can add a changelog entry if the current approach looks good.